Week 2 Projects Specifications: Scrabble & Ciphers
Section 1: Scrabble Project Specifications
Develop an interactive terminal application that prompts two distinct players for vocabulary strings, computes their cumulative point totals, and displays the definitive victor or a tie state.
===================================================================================
SCRABBLE EXECUTION FLOWCHART
===================================================================================
[ Input P1 ] ββ> compute_score() βββ
βββ> Comparison ββ> [ Print: Player X wins! / Tie! ]
[ Input P2 ] ββ> compute_score() βββ
===================================================================================
- Architecture of compute_score: The subroutine must accept a character string parameter
string wordand return a pure integer score, strictly ignoring all numerical digits, punctuation, and whitespace symbols.
Section 2: Readability Project Specifications
The application prompts the user for an expansive text string and applies the strict Coleman-Liau formulation.
- Mathematical Rounding: Strict utilization of
round()from<math.h>to evaluate a rounded integer index. - Integer Division Hazard: When calculating averages, developers must explicitly cast integer operands to floating-point values to prevent runtime truncation of decimal precision.
Section 3: Cryptographic Project Specifications
Definitive execution guardrails for the Caesar and Substitution encryption binaries.
- Caesar Key Verification: The runtime must verify exactly one parameter is passed
argc == 2, ensuring it represents a valid numeric key. Otherwise, printUsage: ./caesar keyand return exit code 1. - Substitution Key Engineering: The runtime must verify the key contains exactly 26 unique alphabetical characters, while preserving cleartext casing and formatting perfectly.